package com.kevin.controller.admin;

import java.io.IOException;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping;

@Controller("adminCoreController")
public class CoreController{
	
	@Autowired
	ControllerClassNameHandlerMapping mapping;
	
	@RequestMapping
	public void test(HttpServletResponse response) throws IOException{
		Map<String, Object> handlerMap = mapping.getHandlerMap();
		Set<Entry<String, Object>> entrySet = handlerMap.entrySet();
		for(Entry<String, Object> entry:entrySet){
			System.out.println(entry.getKey()+" : "+entry.getValue());
		}
		response.getWriter().print("admin Core test");
	}
	
	@RequestMapping
	public void abc(HttpServletResponse response) throws IOException{
		response.getWriter().print("admin Core abc");
	}

}
